home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1994…tember: Reference Library / Dev.CD Sep 94.toast / Periodicals / develop / develop Issue 18 / develop 18 code / OSA Sample / Sources / ObjModelEvents.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-01-28  |  1.6 KB  |  77 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        ObjModelEvents.h
  3.  
  4.     Contains:    Apple Event handlers interface
  5.  
  6.     Developed by:    
  7.         
  8.         Paul G Smith (commstalk hq & Full Moon Software, Inc)
  9.         
  10.         you can leave messages at (UK): 0727 844232; (US): 408 253 7199
  11.         BUT I prefer to be contacted by e-mail
  12.         AppleLink:     SMITH.PG
  13.         Internet:     SMITH.PG@applelink.apple.com
  14.         
  15.         "SimpliFace" Sample code to accompany develop article
  16.         on techniques for embedding scripts in applications.
  17.  
  18.  
  19.     Apple Event handlers for SimpliFace
  20.  
  21. */
  22.  
  23. #ifndef __AEOMEVENTS__
  24. #define __AEOMEVENTS__
  25.  
  26.  
  27. #ifndef __APPLEEVENTS__
  28. #include "AppleEvents.h"
  29. #endif
  30.  
  31. #ifndef __PASCALSTRING__
  32. #include <PascalString.h>
  33. #endif
  34.  
  35.  
  36. // installation
  37.  
  38. pascal OSErr InstallEventHandlers(void);
  39.  
  40. pascal OSErr DeInstallEventHandlers(void);
  41.  
  42.  
  43. OSErr GetCurrentAppFileSpec(short *vRefNum, long *dirID, StringPtr fileName);
  44.  
  45. void GetCurrAppName(CStr255& appName);
  46.  
  47.  
  48. // special Apple Events
  49.  
  50. static    pascal OSErr GetAETEAEvtHandler (AppleEvent *theEvent, 
  51.                                         AppleEvent *theReply, 
  52.                                         long theRefCon);
  53.  
  54.  
  55. // object model Apple Events
  56.     
  57. static    pascal OSErr StdAEvtPreHandler (AppleEvent *theEvent, 
  58.                                         AppleEvent *theReply, 
  59.                                         long theRefCon);
  60.     
  61. static    pascal OSErr RqdAEvtHandler       (AppleEvent *theEvent, 
  62.                                         AppleEvent *theReply, 
  63.                                         long theRefCon);
  64.  
  65. static    pascal OSErr StdAEvtHandler       (AppleEvent *theEvent, 
  66.                                         AppleEvent *theReply, 
  67.                                         long theRefCon);
  68.  
  69. static  pascal Boolean StdIdleFunction (EventRecord *theEventRecord,
  70.                                         long *sleepTime,
  71.                                         RgnHandle *mouseRgn);
  72.  
  73.  
  74. // -------------------------------------------------------
  75.  
  76. #endif
  77.